<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'money.jsp' starting page</title>
<link rel="stylesheet" type="text/css"
			href="${pageContext.request.contextPath}/easyui/1.3.4/themes/default/easyui.css" />
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/wu.css" />
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/icon.css" />
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.8.0.min.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/easyui/1.3.4/jquery.easyui.min.js"></script>
		<script type="text/javascript"
			src="${pageContext.request.contextPath}/easyui/1.3.4/locale/easyui-lang-zh_CN.js"></script>
		<script type="text/javascript">
			$(function(){
				var msg = $("#msg").val();
			if(msg!=""){
				$.messager.show({
					title:'消息',
					msg:msg
				});
				$("#msg").val("");
			}
				var deptid=$("#deptid").val();
				$("#type").combobox({
				url:'${pageContext.request.contextPath}/dictionary?op=dictchild&secid=1',
				valueField:'id',
				textField:'dictname',
				panelHeight:'auto'
				});
				
				$("#pp").combobox({
				url:'user.html?op=Leader',
				valueField:'id',
				textField:'realname',
				panelHeight:'auto'
				});
				$("#pb").combobox({
				url:'${pageContext.request.contextPath}/dept?op=showRealName&id='+ deptid,
				valueField:'id',
				textField:'realname',
				panelHeight:'auto'
				});
				
				
			window.onload=function()
            {
			var bt=document.getElementById("bt");
			bt.onclick=function()
			{
			if(document.myform.content.value=="")
			{
			alert("申请事由不能为空!");
			document.myform.content.focus();
			return false;
			} 
			
			else if(document.myform.roleid.value=="")
			{
			alert("下一步审批人不能为空!");
			document.myform.roleid.focus();
			return false; 
			}
			}
			}
			});
			
		</script>
</head>
<body>
	<div style="margin: auto;width: 800px;height: 40px;">
			人事管理》收入证明流程
		</div>
		<form action="${pageContext.request.contextPath}/money?op=add" method="post" name="myform">
		<div style="margin: auto; border-bottom: 1px solid black; border-top: 1px solid black; width: 800px;height: 400px">
			<table style="margin-top: 15px;margin-left: 20px;font-size: 12px">
			<input type="hidden" name="userid" value="${sys_user.id }"/>
			<input type="hidden" name="deptid" value="${sys_user.department.id }"/>
			
				<tr>
					<td style="width: 100px;height: 40px">姓名:</td>
					<td style="width: 150px">${sys_user.realname }</td>
				</tr>
				<tr>
					<td style="width: 100px;height: 40px">部门：</td>
					<td style="width: 150px">${sys_user.department.deptname }</td>
				</tr>	
				<tr>
					<td style="width: 100px">申请事由:</td>
					<td style="width: 150px" colspan="3">
						<textarea rows="8px" cols="80px" name="content" ></textarea>
					</td>
				</tr>
			</table>
		</div>
		<div style="margin: auto;width: 800px;height: 40px; margin-top:15px;">
			<table style="margin-left: 50px">
				<tr>
					<td style="width: 150px">下一步审批人:</td>
					<td style="width: 150px">
					<c:if test="${sys_user.role.id==5 }">
						<input type="text" id="pb" name="roleid"/>
						<input type="hidden" id="deptid" value="${sys_user.department.id }"/>	
					</c:if>	
					<c:if test="${sys_user.role.id==3 }">
						<input type="text" id="pp" name="roleid"/>
					</c:if>
					</td>
					<td style="width: 200px"></td>
					<td style="width: 100px">
						<input type="submit" value="确定" id="bt">
					</td>
					<td style="width: 100px">
						<input type="submit" value="取消">
					</td>
				</tr>
			</table>
		</div>
			
		</form>
		<input type="hidden" id="msg" value="${msg }">
</body>
</html>
